This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Refactored, Tightly Packed, and Getter Functionalities#3
Open
Hendobox wants to merge 2 commits intocapofficial:mainfrom
Open
Refactored, Tightly Packed, and Getter Functionalities#3Hendobox wants to merge 2 commits intocapofficial:mainfrom
Hendobox wants to merge 2 commits intocapofficial:mainfrom
Conversation
I added a new method in the Store.sol file named collectTreasuryFee. This method will enable the gov address to collect available fees in the base cryptocurrency. After this happens, the fee balance in the contract gets updated.
Contributor
|
@Hendobox thanks, but a direct payment is requested here, without need for the treasury to manually collect the accrued fees. They can be paid out directly to the treasury address as they come in. |
Author
Okay, got it. Will review as such 👍🏻 |
rearranged the state variables in the Store.sol file to optimize storage. Secondly, created IStore, ITrade, ICLP, and IPool interfaces to eliminate redundancy in the codebase, thus optimizing our storage. Thirdly, since the contracts now import interfaces, I added getter functions for state variables in the Store.sol file for accessibility getPoolBalance, getPoolWithdrawalFee, getPoolLastPaid, getBufferBalance, getBufferPayoutPeriod, getPoolFeeShare, getKeeperFeeShare, getMinimumMarginLevel, and getFundingInterval. Fourthly, since the treasury fee will be sent out to the treasury wallet address on the go, I decided to set the value for the treasury wallet during deployment because we do not want a case where fees are sent to the Lastly, updated the README file. I discovered that MAX_FEE was already set in the contract. I also ticked the treasury fees and refactoring tasks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added a new method in the Store.sol file named collectTreasuryFee. This method will enable the gov address to collect available fees in the base cryptocurrency. After this happens, the fee balance in the contract gets updated.